package com.vinoxm.common.base.configure;

import com.vinoxm.common.base.result.BaseResult;
import lombok.extern.log4j.Log4j2;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.beans.factory.annotation.Value;

@Log4j2
public class BaseResultConfiguration implements InitializingBean {

    @Value("${result.max-size: 500}")
    private Integer resultMaxSize;

    @Override
    public void afterPropertiesSet() throws Exception {
        BaseResult.setResultMaxSize(resultMaxSize);
        log.info(String.format("[BseResult Configuration] Setup Data result max size: %s", resultMaxSize));
    }
}
